<template>
  <div class="left-container">
    <h3>Left 组件</h3>
    <!-- 渲染 Article 组件 -->
    <Article :list="list">
      <template #title>
        <h1>我是左侧的标题</h1>
      </template>
      <template #body="{item}">
        <div>{{ item }}</div>
      </template>
      <template #author>
        <h2>我是左侧的作者</h2>
      </template>
    </Article>
  </div>
</template>

<script>
import Article from './Article.vue'
export default {
  name: 'MyLeft',
  components: {
    Article
  },
  data () {
    return {
      age: 18,
      list: ['a', 'b', 'c', 'd']
    }
  }
}
</script>

<style lang="scss">
.left-container {
  padding: 0 20px 20px;
  background-color: orange;
  min-height: 250px;
  flex: 1;
}
</style>
